package org.contextsensitivetodo.context.rules.time;

import org.contextsensitivetodo.context.rules.SuperContextRule;

import android.text.format.Time;

public class DayOfWeekContextRule extends SuperContextRule {

	
	boolean[] rules = new boolean[6];
	
	public DayOfWeekContextRule(boolean[] rules){
		this.rules = rules;
	}
	
	
	public void doStateUpdate() {
		Time now = new Time();
		now.setToNow();
		int weekdayNro = now.weekDay;
		
		this.setNewState(this.rules[weekdayNro]);		
	}

	public String getRuleName() {
		return "day of week rule: "+ this.rules;
	}

}
